package com.qf.mybatis01.dao;

import com.qf.mybatis01.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserDao {
    //根据用户id查询用户
    public User selectUserById(Integer id);

    public User selectUserByIdAndPwd(Integer id, String pwd);

    public User selectUserByNameAndPwd(@Param("username") String name, @Param("password") String pwd);

    public User selectUserByNameAndPwd_Map(Map map);

    //参数为user对象
    public User selectUserByNameAndPwd_Obj(User user);

    //根据传入用户
    public List<User> selectUserByName(@Param("keyword") String keyword);
    //删除
    public int deleteUserById(@Param("id") Integer id);
    //修改
    public int updateUserById(User user);
    //添加
    public int insertUser(User user);

}
